﻿using QLBH.DATA;
using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QLBH.BUSINESS
{
    public class NhaCungCapBus
    {
        private static NhaCungCapData db = new NhaCungCapData();
        public static List<NHA_CUNG_CAP> TimNhaCungCapTheoTen(string ten_nha_cung_cap, int tong_so_dong)
        {
            return db.TimNhaCungCapTheoTen(ten_nha_cung_cap, tong_so_dong);
        }

        public static string ThemMoi(NHACUNGCAPPARAM NHACUNGCAP)
        {
            if (db.ThemMoi(NHACUNGCAP))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string CapNhat(NHACUNGCAPPARAM NHACUNGCAP)
        {
            if (db.CapNhat(NHACUNGCAP))
            {
                return "1";
            }
            else
                return db.Error;
        }

        public static string Xoa(string[] MA_NHA_CUNG_CAP)
        {
            if (db.Xoa(MA_NHA_CUNG_CAP))
            {
                return "1";
            }
            else
                return db.Error;
        }

    }
}